#pragma once
#include<SFML\Graphics.hpp>
#include "BulletFactory.h"

namespace cat
{
	class Tank
	{
	private:
		float _x, _y, 
			_vx, _vy,
			_turretDirection,
			_cannonY, _cannonTargetY;
		int _burstFrameTimer;
		struct{
			float velocity;
			float angle;
		} _input;
		struct{
			sf::CircleShape turret;
			sf::RectangleShape gunLeft;
			sf::RectangleShape gunRight;
		} _visual;

		void FireLeft();
		void FireRight();
	public:
		Tank();

		void think();
		void draw();

		void move(float angle, float velocity);
		void setVelocity(float velocity);
		void turretTarget(float x, float y);
		void fire();

		~Tank(void);
	};
}

